
<div class="pad-10">

	<div class="navigate">
        <h1>
        当前位置：
        <a href="/index.php" target="_parent">首页</a>
        &gt;
        <a href="/index.php/Admin/Task/add" target="_self">任务添加</a>
        </h1>
        <span class="ui-button ui-button-morange fr"> <a href="/index.php/Admin/Task/" class="ui-button-text fr">任务单列表</a> </span>
  	</div>
  	
  	
<div class="col-tab">
<ul class="tabBut cu-li">
	<li id="tab_setting_1" class="on"
		onclick="SwapTab('setting','on','',2,1);">任务添加</li>
</ul>
<div id="div_setting_1" class="contentList pad-10">

<form id="form_task" action="/index.php/Admin/Task/add_do" method="post">
<table width="100%" cellpadding="2" cellspacing="1" class="table_form">

	<tr>
		<th width="100">客户:</th>
		<td>
		
			<select name="user_id" id="user_id" class="form-select">
				<volist name="users" id="u">
				<option value="{$u.user_id}"<if condition="$user_id eq $u['user_id']"> selected</if>>[{$u.user_id}]&nbsp;[{$u.plantform_name}]&nbsp;[{$u.shop_name}]&nbsp;{$u.user_name}</option>
				</volist>
          	</select>
			<span class="color-red" title="必填">*</span>
		</td>
	</tr>

	<tr>
		<th width="100">开始时间:</th>
		<td>
    	
    	<input type="text" class="Wdate tc w150" id="begin" name="begin_time" onclick="javascript:WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" value="{$begin_time}" />
    	<span class="color-red" title="必填">*</span>
    	&nbsp;结束时间:
    	<input type="text" class="Wdate tc w150" id="end" name="end_time" onclick="javascript:WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" value="{$end_time}" />
    	<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	

	
	<tr class="<eq name="up_success" value="0">hidden</eq>">
		<th width="100">代付费</th>
		<td>
		<input type="text" name="task_order_money" id="task_order_money" class="input-text"
			value="{$task_order_money}" style="width:300px;">元
			<span class="color-red" title="必填">*</span>
		</td>
	</tr>
	
	<tr class="<eq name="up_success" value="0">hidden</eq>">
		<th width="100">手续费:</th>
		<td>
			<input type="radio" id="commission_danjia" name="commission_type" value="danjia" checked />
			<label for="commission_danjia">按单价</label>
		
			<input type="radio" id="commission_bili" name="commission_type" value="bili" />
			<label for="commission_bili">按比例</label>
			
			<br />
			<br />
			
			<span id="sp_danjia">
				<input type="text" class="w60 tc" id="danjia" class="input-text" value="0">元/单
				*
				单量<span id="sp_order_count" class="red">{$order_count}</span>
			</span>
			
			<span id="sp_bili" class="hidden">
				代付费比例 <input type="text" class="w60 tc" id="bili" class="input-text" value="0">%
			</span>
			
			= 共<input type="text" class="input-text w60 tc" name="commission_money" id="commission_money" value="0"> 元 <span class="color-red" title="必填">*</span> 
			
		</td>
	</tr>
	
	

	<tr class="hidden">
		<th width="100">订单量:</th>
		<td>
			<input type=hidden name="order_count" value="{$order_count}" />
		</td>
	</tr>
		
	<tr class="<eq name="up_success" value="0">hidden</eq>">
		<th width="100">快递信息:</th>
		<td>
		
			<span>
				<input type="text" class="w60 tc" id="kuaidi" class="input-text" value="0">元/单
				*
				单量<span class="red">{$order_count}</span>
			</span>
			= 共<input type="text" class="input-text w60 tc" name="value_added_money" id="value_added_money" value="0">元 <span class="color-red" title="必填">*</span>
		</td>
	</tr>
	
	<tr class="<eq name="up_success" value="0">hidden</eq>">
		<th width="100">总费用:</th>
		<td>
			<span id="sp_total_money">{$task_order_money}</span>元
		</td>
	</tr>
	
	<tr class="hidden">
		<th width="100">备注信息:</th>
		<td>
			<textarea name="remark" id="remark" cols="80" rows="5"></textarea>
		</td>
	</tr>
	
	<tr class="<eq name="up_success" value="0">hidden</eq>">
		<th width="100"></th>
		<td>

            <div class="ui-button ui-button-morange">
                <input type="submit" id="btnSubmit" value="保 存" class="ui-button-text" onclick="javascript:return confirm('确认数据无误并保存？');">
            </div>

            <div class="ui-button ui-button-cancel">
			    <input type="button" value="取消" id="btnCancel" class="ui-button-text" />
            </div>

		</td>
	</tr>

</table>
<textarea style="display:none;" name="serialize_orders">{$serialize_orders}</textarea>
</form>


<form id="form_file" name="form_file" enctype="multipart/form-data" action="/index.php/Admin/Task/add" method="post">
<table width="100%" cellpadding="2" cellspacing="1" class="table_form">
	<tr>
		<th width="100"></th>
		<td>

			<a href="/Upload/admin/task/task_orders.csv" target="_blank">下载任务单模板</a>
			
			
				<input type="file" name="task_orders" />

                <div class="ui-button ui-button-sorange">
				    <input id="btnUpload" type="button" class="ui-button-text" value="上传任务单" />
                </div>
		</td>
	</tr>
</table>

<!-- 上传时传过去 -->

<input type="hidden" id="hd_user_id" name="user_id" />
<input type="hidden" id="hd_begin_time" name="begin_time" />
<input type="hidden" id="hd_end_time" name="end_time" />

</form>



<if condition="$task_orders neq array()">
<table width="100%" cellpadding="2" cellspacing="1" class="table_form">
	<thead>
		<tr>
			<th>订单号</th>
			<th>快递公司</th>
			<th>快递单号</th>
			<th>收货人</th>
			<th>收货地址</th>
			<th>电话</th>
			<th>产品链接</th>
			<th>产品名称</th>
			<th>关键词</th>
			<th>购买量</th>
			<th>刷单价</th>
			<th>最终价</th>
			<th>评论</th>											
		</tr>
	</thead>
	
	<volist name="task_orders" id="d" key="k" >
	<tr>
		
		<td class="tc">{$k}</td>		
		<volist name="d" id="item" key="j">
			<if condition="$j neq 1">
			<td class="tc">{$item}</td>		
			</if>
		</volist>
	</tr>
	</volist>
</table>

</if>

</div>

</div>
</div>



<script type="text/javascript" src="/Js/WdatePicker.js"></script>
<script type="text/javascript" src="/Js/jquery.form.js"></script>
<script type="text/javascript" src="/Js/adm/task/add.js"></script>